package com.cpe.transfer.sharing;

import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Component;
import org.springframework.util.Assert;

import com.cpe.data.domain.sharing.Sharing;
import com.cpe.data.domain.sharing.SharingForm;

@Component
public class SharingTransfer {
	/**
	 * 表单-->实体
	 */
	public Sharing toEntity(SharingForm form) {
		Assert.notNull(form);
		Sharing sharing = new Sharing();
		BeanUtils.copyProperties(form, sharing);
		return sharing;
	}
}
